<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        var arr1 = ['星期一','星期二','星期三','星期四','星期五','星期六','星期日'];
        console.log(arr1[6]);
        var arr2 = ['关羽','张飞','马超','赵云','黄忠','刘备','姜维'];
        for (i=0;i<7;i++) {
            console.log(arr2[i]);
        }
        var arr3 = [2,6,1,7,4];
        var sum = 0;
        var average = 0;
        for (i = 0;i < arr3.length;i++) {
            sum += arr3[i];
        }
        average = sum / arr3.length;
        console.log(sum);
        console.log(average);
    </script>
</body>
</html>